import 'package:flutter_ahj_app/app/NewLogin/LoginModel.dart';
import 'package:flutter_ahj_app/base/basewidget/viewmodel/BaseViewModel.dart';
import 'package:flutter_ahj_app/base/bean/GYSData.dart';

class LoginViewModel extends BaseViewModel<LoginModel> {
  @override
  LoginModel get initModel => LoginModel();

  String setlogInData(String name, String password) {
    return model.getTestData(name, password);
  }

  Stream<Map> getDataStream() => model.dataStream;

  Stream getRoleStream() => model.roleStream;

  String changeRoles() {
    return model.changeRoles();
  }

  Stream getCheckCodeStream() => model.checkCodeStream;

  String getCheckCode(String phone) {
    return model.getCheckCode(phone);
  }

  Stream<Map> getCheckCodeLoginStream() =>
      model.checkCodeLoginStream;

  checkCodeLogin(String phone, String code) {
    return model.checkCodeLogin(phone, code);
  }

  Stream<GYSInfo> gysInfoStream() => model.gysInfoStream;

  String gysInfo() {
    return model.gysInfo();
  }

  Stream<int> getUserRoleStream() => model.getUserRoleStream;

  int getUserRole() {//获取当前登录人角色
    return model.getUserRoleInfo();
  }


  String getCheckToken() {
    return model.getCheckToken();
  }

  Stream<Map> yiJianLoginStream() =>
      model.yiJianLoginStream;
  yiJianLogin(String code) {
    return model.yiJianLogin(code);
  }

}
